package com.zzh.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @author wenrouyue
 * @FileName: UserLoginRecord
 * @description
 * @create 2023/2/16-21:29
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "user_login_record")
public class UserLoginRecord implements Serializable {

    private static final long serialVersionUID = -6400059111995697802L;

    @TableId
    private Integer id;

    private Integer userId;

    private String loginIp;

    private String loginEmail;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    public UserLoginRecord(Integer userId, String loginIp, String loginEmail) {
        this.userId = userId;
        this.loginIp = loginIp;
        this.loginEmail = loginEmail;
    }
}
